package com.zy.entity;

import java.util.List;

/**
 * 分页信息
 * @author 张宇
 * @date 2021/8/3 11:35
 */
public class Page<T>
{

    private int pageNo;//当前页码

    private int pageTotal;//总页码

    private int pageSize;//每页显示数量

    private int pagesTotalCount;//总记录数

    private List<T> items;//每页信息

    public int getPageNo() {
        return pageNo;
    }

    public void setPageNo(int pageNo) {
        this.pageNo = pageNo;
    }

    public int getPageTotal() {
        return pageTotal;
    }

    public void setPageTotal(int pageTotal) {
        this.pageTotal = pageTotal;
    }

    public int getPageSize() {
        return pageSize;
    }

    public void setPageSize(int pageSize) {
        this.pageSize = pageSize;
    }

    public int getPagesTotalCount() {
        return pagesTotalCount;
    }

    public void setPagesTotalCount(int pagesTotalCount) {
        this.pagesTotalCount = pagesTotalCount;
    }

    public List<T> getItems() {
        return items;
    }

    public void setItems(List<T> items) {
        this.items = items;
    }

    public Page() {

    }

    public Page(int pageNo, int pageTotal, int pageSize, int pagesTotalCount, List<T> items) {
        this.pageNo = pageNo;
        this.pageTotal = pageTotal;
        this.pageSize = pageSize;
        this.pagesTotalCount = pagesTotalCount;
        this.items = items;
    }

    @Override
    public String toString() {
        return "Page{" +
                "pageNo=" + pageNo +
                ", pageTotal=" + pageTotal +
                ", pageSize=" + pageSize +
                ", pagesTotalCount=" + pagesTotalCount +
                ", items=" + items +
                '}';
    }

}
